<template>
  <div>
    <div id="login-box">
      <h1>Login</h1>
      <div class="form">
        <div class="item">
          <i class="fa fa-user"></i>
          <input type="text" placeholder="Username" />
        </div>
        <div class="item">
          <i class="fa fa-key" aria-hidden="true"></i>
          <input type="password" placeholder="Password" />
        </div>
      </div>
      <button>Login</button>
    </div>
    <iframe
      ref="three"
      src="/static/three/index.html"
      style="position: absolute; width: 100%; height: 100%"
      frameborder="0"
    ></iframe>
  </div>
</template>

<script>
export default {
  mounted() {
    let three = this.$refs.three;
    var iwindow = three.contentWindow;
    console.log(iwindow,'three')
  },
};
</script>

<style>
body {
  background-repeat: no-repeat;
  background-size: 100% auto;
}
#login-box {
  z-index: 111;
  width: 30%;
  height: 30%;
  text-align: center;
  background: #00000060;
  padding: 20px 50px;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
}
#login-box h1 {
  color: #fff;
}
#login-box .form .item input {
  margin-top: 15px;
}
#login-box .form i {
  font-size: 18px;
  color: #fff;
}
#login-box .form .item input {
  width: 180px;
  font-size: 18px;
  border: 0;
  border-bottom: 2px solid#fff;
  padding: 5px 10px;
  background: #ffffff00;
  color: #fff;
}
#login-box button {
  margin-top: 15px;
  width: 180px;
  height: 30px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(to right, #f30909 0%, #4013e6e1 100%);
  border: 0;
  border-radius: 15px;
}
input {
  outline: none;
}
</style>
